import {
    request
} from './request'

//获取歌单分类
export function getplaylist() {
    return request({
        url: '/playlist/catlist',
        params: {}
    })
}
//获取推荐歌单
export function getRecplaylist(limit) {
    return request({
        url: '/personalized',
        params: { limit }
    })
}
//获取精品歌单
export function getBoutique(limit, before) {
    return request({
        url: '/top/playlist/highquality',
        params: { limit, before }
    })
}
//获取排行榜歌单
export function getRankList() {
    return request({
        url: '/toplist',
        params: {}
    })
}

//获取网友精选歌单
export function getSelect(limit) {
    return request({
        url: '/top/playlist',
        params: { limit }
    })
}

//获取分类du对应歌单/top/playlist
export function selectList(cat, limit = 100, offset) {
    return request({
        url: '/top/playlist',
        params: { cat, limit, offset }
    })
}

//获取歌单信息
export function getPlayListDetail(id) {
    return request({
        url: 'playlist/detail',
        params: {
            id
        }
    })
}

//获取歌单评论
export function getComment(id, limit, offset) {
    return request({
        url: '/comment/playlist',
        params: {
            id,
            limit,
            offset
        }
    })
}

//获取歌单歌曲列表信息
export function getMusicDetailList(ids) {
    return request({
        url: '/song/detail',
        params: {
            ids
        }
    })
}